@page "/samples/issue187"
@using System.ComponentModel.DataAnnotations
<BSRow>
    <BSCol MD="5">
        <h3>Non Nullable</h3>
        Int - @Model.Int.ToString()
        <br />
        Long - @Model.Long.ToString()
        <br />
        Double - @Model.Double.ToString()
        <br />
        Guid - @Model.Guid.ToString()
        <br />
        DateTime - @Model.DateTime.ToString()
        <br />
        <h3>Nullable</h3>
        Int? - @(Model.NInt == null ? "Null" : Model.NInt.ToString())
        <br />
        Long? -  @(Model.NLong == null ? "Null" : Model.NLong.ToString())
        <br />
        Double? -  @(Model.NDouble == null ? "Null" : Model.NDouble.ToString())
        <br />
        Guid? - @(Model.NGuid == null ? "Null" : Model.NGuid.ToString())
        <br />
        DateTime? -  @(Model.NDateTime == null ? "Null" : Model.NDateTime.ToString())
        <br />
    </BSCol>
    <BSCol MD="7">
        <BSForm Model="Model">
            <DataAnnotationsValidator />
            <BSLabel>String</BSLabel>
            <BSInput InputType="InputType.Text" @bind-Value="Model.T"></BSInput>
            <BSLabel>String</BSLabel>
            <BSInput InputType="InputType.Text" @bind-Value="Model.T1"></BSInput>
            <BSLabel>String</BSLabel>
            <BSInput InputType="InputType.Text" @bind-Value="Model.T2"></BSInput>
            <BSLabel>Int</BSLabel>
            <BSInput InputType="InputType.Text" @bind-Value="Model.Int"></BSInput>
            <BSLabel>Long</BSLabel>
            <BSInput InputType="InputType.Text" @bind-Value="Model.Long"></BSInput>
            <BSLabel>Double</BSLabel>
            <BSInput InputType="InputType.Text" @bind-Value="Model.Double"></BSInput>
            <BSLabel>Guid</BSLabel>
            <BSInput InputType="InputType.Text" @bind-Value="Model.Guid"></BSInput>
            <BSLabel>DateTime</BSLabel>
            <BSInput InputType="InputType.Text" @bind-Value="Model.DateTime"></BSInput>
            <BSLabel>Int?</BSLabel>
            <BSInput InputType="InputType.Text" @bind-Value="Model.NInt"></BSInput>
            <BSLabel>Long?</BSLabel>
            <BSInput InputType="InputType.Text" @bind-Value="Model.NLong"></BSInput>
            <BSLabel>Double?</BSLabel>
            <BSInput InputType="InputType.Text" @bind-Value="Model.NDouble"></BSInput>
            <BSLabel>Guid?</BSLabel>
            <BSInput InputType="InputType.Text" @bind-Value="Model.NGuid"></BSInput>
            <BSLabel>DateTime?</BSLabel>
            <BSInput InputType="InputType.Text" @bind-Value="Model.NDateTime"></BSInput>
        </BSForm>
    </BSCol>
</BSRow>





@code {
    private NullableTest Model { get; set; } = new NullableTest();

    public class NullableTest
    {
         [Required]
        public string T { get; set; }
         [Required]
        public string T1 { get; set; }

         [Required]
        public string T2 { get; set; }
        [Required]
        public int Int { get; set; }
        [Required]
        public long Long { get; set; }
        [Required]
        public double Double { get; set; }
        [Required]
        public Guid Guid { get; set; }
        [Required]
        public DateTime DateTime { get; set; }
        [Required]
        public int? NInt { get; set; }
        [Required]
        public long? NLong { get; set; }
        [Required]
        public Double? NDouble { get; set; }
        [Required]
        public Guid? NGuid { get; set; }
        [Required]
        public DateTime? NDateTime { get; set; }
    }
}